home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
self
/
contrib.lha
/
contrib
/
SelfNews
/
jotI.self
< prev
next >
Wrap
Text File
|
1993-07-24
|
6KB
|
253 lines
"File jotI.self
created by Ian Wilkinson on Mon Oct 12 18:16:07 1992
Copyright (c) Canon Research Centre Europe, 1992.
All rights reserved."
prototypes system _AddSlotsIfAbsent: ( | ^ jotFct = () | )
(jotFct _Define: foreignFct copyName: 'newJotTextGlue'
Path: (unix environmentVariable: 'SELF_NEWS'), '/wireI.so')
traits system _AddSlotsIfAbsent: ( | ^ jotI = () | )
traits jotI _Define: ( |
_ parent* = traits clonable.
^ initialize: w = (
| ignore = jotFct copyName: 'jotInitializeGlue' |
ignore value: w
)
| )
prototypes system _AddSlotsIfAbsent: ( | ^ jotI = () | )
jotI _Define: ( |
_ parent* = traits jotI.
_ thisObjectPrints = true.
^ printString = 'a jotInterface'.
| )
traits system _AddSlotsIfAbsent: ( | ^ jotView = () | )
traits jotView _Define: ( |
_ parent* = traits proxy.
^ newViewFor: jotT On: w = ( | jotRsrcMaker = jotFct copyName: 'newJotViewGlue' |
jotI initialize: w.
(jotRsrcMaker value: jotT
With: true
With: w
With: deadCopy)
discoverBehaviour
).
^ canvas = (
| jotRsrcMaker = jotFct copyName: 'jotViewCanvasGlue' |
jotRsrcMaker value: self
).
^ discoverBehaviour = ( | jotViewInspect. bv. nBytes = typeSizes byteSize: 'int' |
jotViewInspect: jotFct copyName: 'jotViewAspectsGlue'.
aspects: jotViewInspect value: self.
jotViewInspect: jotFct copyName: 'jotViewBehaviourGlue'.
bv: byteVector copySize: nBytes * aspects.
jotViewInspect value: self With: bv.
behaviour: behaviour copySize: aspects FillingWith: 0.
0 to: bv size - nBytes By: nBytes Do: [ | :i |
behaviour at: i / nBytes
Put: (bv cIntSize: (typeSizes bitSize: 'int')
Signed: true
At: i)
].
self
).
^ respond = ( | responder |
responder: jotFct copyName: 'jotViewRespondGlue'.
responder value: self
).
^ update: w = (
(jotFct copyName: 'jotViewUpdateGlue') value: w With: self.
self
).
^ setReadOnly: isProtected = (
(jotFct copyName: 'jotViewSetReadOnlyGlue') value: isProtected With: self
)
| )
prototypes system _AddSlotsIfAbsent: ( | ^ jotView = () | )
jotView _Define: proxy deadCopy _AddSlots: ( |
_ parent* = traits jotView.
^_ aspects.
^_ behaviour <- vector
| )
traits system _AddSlotsIfAbsent: ( | ^ jotText = () | )
traits jotText _Define: ( |
_ parent* = traits proxy.
^ newText: initialSz = (
| jotRsrcMaker = jotFct copyName: 'newJotTextGlue' |
jotRsrcMaker value: initialSz With: deadCopy
).
^ placeAtEnd: text = (
(jotFct copyName: 'placeAtEndGlue') value: text With: self
).
^ size = (
(jotFct copyName: 'sizeGlue') value: self
).
^ contentsInto: s = (
(jotFct copyName: 'contentsIntoGlue') value: s With: self
)
| )
prototypes system _AddSlotsIfAbsent: ( | ^ jotText = () | )
jotText _Define: proxy deadCopy _AddSlots: ( |
_ parent* = traits jotText.
| )
traits system _AddSlotsIfAbsent: ( | ^ jotRuler = () | )
traits jotRuler _Define: ( |
_ parent* = traits proxy.
^ newRuler = ( (jotFct copyName: 'newJotRulerGlue') value: deadCopy ).
^ initialiseFontFor: text In: view = (
(jotFct copyName: 'jotFontInitializeGlue') value: self
With: view
With: text
).
^ firstIndent: fi = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotFirstIndent With: fi.
self
).
^ leftIndent: li = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotLeftIndent With: li.
self
).
^ rightIndent: ri = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotRightIndent With: ri.
self
).
^ spaceBefore: sb = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotSpaceBefore With: fi.
self
).
^ spaceAfter: sa = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotSpaceAfter With: fi.
self
).
^ lineSpacing: ls = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotLineSpacing With: fi.
self
).
^ tabStops: ts = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotTabStops With: fi.
self
).
^ font: fontName = (
(jotFct copyName: 'jotRulerSetFontGlue')
value: self With: fontName.
self
).
^ bold: isOn = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotBold With: isOn.
self
).
^ italic: isOn = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotItalic With: isOn.
self
).
^ underline: isOn = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotUnderline With: isOn.
self
).
^ strike: st = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotStrikethru With: st.
self
).
^ fontSize: fs = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotFontSize With: fs.
self
).
^ baselineOffset: bo = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotBaselineOffset With: bo.
self
).
^ fgColor: fg = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotFgColor With: fg.
self
).
^ bgColor: bg = (
(jotFct copyName: 'jotRulerSetParameterGlue')
value: self With: jotBgColor With: bg.
self
).
^ rulerName: rn = (
(jotFct copyName: 'jotRulerSetRulerNameGlue')
value: self With: rn.
self
).
^ parameters* = ( |
^ jotLineStyle = 0.
^ jotFirstIndent = 1.
^ jotLeftIndent = 2.
^ jotRightIndent = 3.
^ jotSpaceBefore = 4.
^ jotSpaceAfter = 5.
^ jotLineSpacing = 6.
^ jotTabStops = 7.
^ jotFont = 8.
^ jotBold = 9.
^ jotItalic = 10.
^ jotUnderline = 11.
^ jotStrikethru = 12.
^ jotFontSize = 13.
^ jotBaselineOffset = 14.
^ jotFgColor = 15.
^ jotBgColor = 16.
^ jotRulerName = 18
| ).
^ lineStyles* = ( |
^ justify = 200.
^ leftAlign = 201.
^ rightAlign = 202.
^ center = 203.
^ characterWrap = 204.
^ characterClip = 205
| ).
^ strikethru* = ( |
^ off = 0.
^ on = 1.
^ invert = 2
| )
| )
prototypes system _AddSlotsIfAbsent: ( | ^ jotRuler = () | )
jotRuler _Define: proxy deadCopy _AddSlots: ( |
_ parent* = traits jotRuler
| )